package com.hopu.v1.pojo.course;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hopu.v1.pojo.classes.ClassCourseProgress;
import com.hopu.v1.pojo.system.Class;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * 课程表
 * @TableName t_course
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value ="t_course")
public class Course implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 课程id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * pid(父级id)
     */
    @TableField("pid")
    private Integer pid;

    /**
     * 课程名称
     */
    @TableField("course_name")
    private String courseName;

    /**
     * 课程描述
     */
    @TableField("course_description")
    private String courseDescription;

    /**
     * 排序
     */
    @TableField("`order`")
    private Long order;

    /**
     * 学科id
     */
    @TableField("subject_id")
    private Long subjectId;

    /**
     * 课程状态：1正常0废弃
     */
    @TableField("`status`")
    private Integer status;

    /**
     * 课程标签
     */
    @TableField("course_tag")
    private String courseTag;

    /**
     * 课程内容
     */
    @TableField("course_content")
    private String courseContent;

    /**
     * 一对多查询子集
     */
    @TableField(exist = false)
    private List<Course> children;

    /**
     * 连接课程作业表
     */
    @TableField(exist = false)
    private List<CourseHomework> homeworkList;

    /**
     * 连接课程反馈表
     */
    @TableField(exist = false)
    private List<CourseFeedback> feedbackList;

    /**
     * 链接class表
     */
    private List<Class> classes;

    /**
     * 链接班级进度表
     */
    private List<ClassCourseProgress> classCourseProgresses;

}